﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<PagedList<PaperSystem.Models.StatisticsQuestionList>>" %>
<%@ Import Namespace="Webdiyer.WebControls.Mvc"%>
<%@ Import Namespace="PaperSystem.Models"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>试题统计</title>
    <link type="text/css" href="/Content/common.css" rel="Stylesheet" />
    <style type="text/css">
        .table_container tbody{cursor:default;}
        .col_creator, .col_course, .col_content, .col_type, .col_num, .col_rate{height:100%;text-align:center;}
    </style>
</head>
<body>

<div class="page_container">
	<div class="page_left">
		<div class="page_left_inner">
			<h1 class="left_logo"><a href="#" class="logo" title="试题库系统">试题库系统</a></h1>
			<%if (ViewData["userName"] != null){%>
			    <div class="left_message">欢迎您，<br/><%=ViewData["userName"]%>老师<br /><a href="/Login/Logout/" class="logout">退出</a></div>
			<%} %>
			<ul class="left_nav">
				<li><a href="/Question/QuestionList">题库管理</a></li>
				<li><a href="/Paper/PaperList/">试卷管理</a></li>
				<li><a href="/Paper/PaperCorrectList1">改卷</a></li>
				<li class="current"><a href="/Statistics/PaperList">统计</a></li>
			</ul>
		</div>
	</div>
	<!-- end page_left -->
	<div class="page_center">
		<div class="page_center_inner">
			<div class="tab_container">
				<ul class="tab_nav">
					<li><a href="/Statistics/PaperList">试卷统计</a></li>
					<li class="current">题目统计</li>
				</ul>
			    <div class="tab_content">
				    <div class="tab_content_inner">
				        <form id="form1" action="/Statistics/QuestionList" style="display:inline;">
                            <label>题型:</label><%=Html.DropDownList("type", ViewData["type"] as SelectList, "全部") %>
                            <label>语种:</label><%=Html.DropDownList("course", ViewData["course"] as SelectList, "全部") %>
                            <label>出题者:</label><%=Html.TextBox("creator") %>
                            <a href="#" onclick="document.getElementById('form1').submit();" class="btn_blue">查找</a>
				        </form>
				    </div>
			    </div>
			</div>
			<!-- end tab_container -->
			<!-- content begin here -->
			<div class="table_container">
			    <table id="infoTable">
			        <thead>
			            <tr>
			                <th class="col_creator" width="10%">出题者</th>
			                <th class="col_course" width="10%">语种</th>
			                <th class="col_content" width="30%">题干</th>
			                <th class="col_type" width="20%">题型</th>
			                <th class="col_num" width="10%">答题人数</th>
			                <th class="col_rate" width="20%">答题得分率</th>
			            </tr>
			        </thead>
			        <tbody>
			            <% foreach (var item in Model)
                          { %>
                            <tr>
                                <td class="col_creator"><%=Html.DisplayFor(modelitem => item.creator)%></td>
                                <td class="col_course"><%=Html.DisplayFor(modelitem => item.course)%></td>
                                <td class="col_content text_over" data-num="20"><%=Html.DisplayFor(modelitem => item.content)%></td>
                                <td class="col_type"><%=Html.DisplayFor(modelitem => item.type)%></td>
                                <td class="col_num"><%=Html.DisplayFor(modelitem => item.stuNum)%></td>
                                <td class="col_rate"><%=Html.DisplayFor(modelitem => item.rate)%></td>
                                <td class="col_id"><%=Html.HiddenFor(modelitem => item.eid)%></td>
                            </tr>
			            <%} %>
			        </tbody>
			    </table>
			    <%=Html.Pager(Model, new PagerOptions { PageIndexParameterName = "page", ShowFirstLast = false,PrevPageText = "上一页", NextPageText = "下一页", CurrentPagerItemWrapperFormatString = "<span class=\"cur_page_wrap page_wrap\">{0}</span>", NumericPagerItemWrapperFormatString = "<span class=\"page_wrap\">{0}</span>", NavigationPagerItemWrapperFormatString = "<span class=\"page_nav\">{0}</span>", CssClass = "pages clearfix", SeparatorHtml = "" })%>
			</div>
			<!-- content end here -->
		</div>
	</div>
	<!-- end page_center -->
</div>

<script type="text/javascript" src="/Scripts/jquery-1.9.0.min.js"></script>
<script type="text/javascript" src="/Scripts/common.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
        //点击每行选中该行
        var objTable = $('#infoTable');
        objTable.on('mouseenter', 'tr:gt(0)', function(event) {
            $(this).addClass('hover');
        })
        .on('mouseleave', 'tr:gt(0)', function(event) {
            $(this).removeClass('hover');
        });
    });
</script>
</body>
</html>
